package com.yujian95.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller  // 注册控制器
public class Hello {

    @RequestMapping(value = "/Hello")  // 配置访问路径
    public String HelloWorld(Model model) {
        model.addAttribute("message", "Hello world!!!");  // 添加数据到model
        return "HelloWorld";
    }
}
